]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
main: Show the greeter dialog when we're prepared
authorJasper St. Pierre <jstpierre@mecheye.net>
Wed, 6 Mar 2013 23:01:12 +0000 (18:01 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Thu, 7 Mar 2013 21:35:37 +0000 (16:35 -0500)
If we don't wait until the stage is mapped, pushing a modal
will fail with an X error.

https://bugzilla.gnome.org/show_bug.cgi?id=694321

js/ui/main.js

index f727a661bd0208f389b7aed02c4160f5f7a6d018..b0a8c2d349729079f12a1503808c3859bab8a4d1 100644 (file)
@@ -84,8 +84,6 @@ function _sessionUpdated() {
                                   Shell.KeyBindingMode.NORMAL |
                                   Shell.KeyBindingMode.OVERVIEW,
                                   sessionMode.hasRunDialog ? openRunDialog : null);
-    if (sessionMode.isGreeter && screenShield)
-        screenShield.showDialog();
 }
 
 function start() {
@@ -191,6 +189,12 @@ function _initializeUI() {
     ExtensionDownloader.init();
     ExtensionSystem.init();
 
+    if (sessionMode.isGreeter && screenShield) {
+        layoutManager.connect('startup-prepared', function() {
+            screenShield.showDialog();
+        });
+    }
+
     layoutManager.connect('startup-complete', function() {
                               if (keybindingMode == Shell.KeyBindingMode.NONE) {
                                   keybindingMode = Shell.KeyBindingMode.NORMAL;